/* GUI CONVERTED from rcrp082.p (converter v1.76) Wed Dec 12 05:26:41 2001 */
/* rcrp082.p - Customer Schedules - Shipment History Report Subprogram        */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.4 $                                                           */
/*V8:ConvertMode=Maintenance                                                  */
/* REVISION: 7.3    LAST MODIFIED: 01/09/95      BY: WUG *G0BY*               */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00      BY: *N0KP* Mark Brown        */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.4 $    BY: Jean Miller           DATE: 12/10/01  ECO: *P03H*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* GETS THE QTY INVOICED AND CUM QTY SHIPPED FROM INV HISTORY FILE.
 * IF IN A DISTRIBUTED DB ENVIRONMENT WE WOULD BE GOING BACK TO
 * THE CENTRAL DB. */

define input parameter inv_nbr as character.
define input parameter sodnbr like sod_nbr.
define input parameter sodline like sod_line.
define output parameter invhist_qty_inv as decimal.
define output parameter invhist_cum_qty as decimal.

assign
   invhist_qty_inv = ?
   invhist_cum_qty = ?.

find idh_hist where
     idh_inv_nbr = inv_nbr and
     idh_nbr  = sodnbr     and
     idh_line = sodline
no-lock no-error.

if available idh_hist then
   assign
      invhist_qty_inv = idh_qty_inv
      invhist_cum_qty = idh_cum_qty[1].
